<?php $this->headLink()->appendStylesheet(Ac_Util::getImageBaseUrl('/css/custom_cat_index.v-'.AC_VERSION.'.css'))?>
<?php $this->placeholder('container-class')->set(' cat_index all')?>

<article class="article">
    <section class="main_section">
      <section class="title">
        <h1>所有分類</h1>
      </section>
      <section class="main_info box">
        <a name="top"></a>
        <section class="left column">
          <ul>
            <?php foreach ($this->list->sort(array('pos'=>1))  as $cat): ?>
                <li><a href="#<?php echo (string)$cat->_id?>"><?php echo $cat->name?><span>(<?php echo (int) $cat->listing_count?>)</span></a> </li>
            <?php endforeach;?>
          </ul>
        </section>
        <section class="right column">
          <dl>
            <?php foreach ($this->list as $level1): ?>
                <dt><?php echo $level1->name; ?> (<?php echo (int)$level1->listing_count; ?>) - <a name="<?php echo $level1->_id?>" href="<?php echo $this->geturl('regular', 'search', null, null, array('small_category_list' => $level1->_id))?>">瀏覽所有</a> </dt>
                <dd>
                  <ul>
                    <?php foreach ($level1->getChildren(false, array('status' => 1 )) as $level2): ?>
                        <li> <a href="<?php echo $level2->url()?>"><?php echo $level2->name?></a> </li>
                    <?php endforeach;?>
                  </ul>
                </dd>
                <dd class="back_top"><a href="#top">∧ 返回頁頂</a></dd>
            <?php endforeach?>
          </dl>
     </section>
      </section>
    </section>
    <aside class="aside"> </aside>
  </article>
